n=10;
r=rand(n,1);
plot(r);
t=1:n;
ts=1:0.1:n;
y=spline(t,r,ts);
hold on;
plot(ts,y);
hold off;
y
r(2)
y(2)
